<template slot-scope="scope">
  <transition>
    <div class="container">
      <div class="c0">
        <div class="c00">
          <div class="r1">
            <div class="r1l">{{ props.title }}</div>
            <div
              class="r1r"
              @click="state.isBreak = false"
              v-if="state.isBreak && props.show"
            >
              收起
              <el-icon color="#fff"><ArrowDown /></el-icon>
            </div>
            <div
              class="r1r"
              @click="state.isBreak = true"
              v-if="!state.isBreak && props.show"
            >
              展开
             <el-icon color="#fff"><ArrowUp /></el-icon>
            </div>
          </div>
          <div class="nrSty" v-if="state.isBreak">
            <slot />
          </div>
        </div>
      </div>
    </div>
  </transition>
</template>

<script setup>
const props = defineProps({
  title: String,
  show: {
    type: Boolean,
    default: true,
  },
});
const state = reactive({
  isBreak: true,
});
</script>

<style lang="scss" scoped>
.container {
  width: 300px;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  .hiddenlist {
    height: 40px;
  }
}
.c0 {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  /* padding: 10px; */
  /* background: linear-gradient(135deg, #e9effb 0%, #fbfcff 100%);
  box-shadow: 3px 3px 16px 0px rgba(159, 177, 206, 0.7),
    -4px -3px 10px 0px #ffffff; */
  // border: 1px solid #ffffff;
  background: #fff;
}
.c00 {
  height: calc(100% - 20px);
  /* box-shadow: 1px 1px 2px 0px #ffffff; */
  /* border: 1px solid #ccddf7; */
  border-radius: 8px;
  /* padding: 14px; */
}
.c01 {
  width: 22px;
  height: 100px;
  /* background: linear-gradient(135deg, #e9effb 0%, #fbfcff 100%);
  box-shadow: 3px 3px 16px 0px rgba(159, 177, 206, 0.7),
    -4px -3px 10px 0px #ffffff;
  border: 1px solid #ffffff; */
  /* border-radius: 12px 0 0 12px; */
  display: flex;
  justify-content: center;
  align-items: center;
}
.r1 {
  line-height: 40px;
  height: 40px;
  display: flex;
  /* margin: 14px; */
  background: #2263bf;
  color: #ffffff;
  padding: 0 22px;
}
.nrSty {
  height: calc(100% - 78px);
  margin-top: 10px;
  /* padding: 0 0px 0 12px; */
  transition: all 0.5s;
}
.r1l {
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 14px;
  color: #ffffff;
}
.r1r {
  margin-left: auto;
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 12px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.r2 {
  height: 90px;
  display: flex;
}
.r21 {
  width: 222px;
  height: 90px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0px 2px 10px 0px rgba(201, 212, 230, 0.7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 18px;
}
.r21r {
  display: flex;
  flex-direction: column;
  margin-left: 10px;
}
.r21t {
  line-height: 20px;
  font-size: 14px;
  color: #58627b;
}
.r21n {
  font-family: YouSheBiaoTiHei;
  font-size: 32px;
  color: #293555;
  line-height: 42px;
}
.r21w {
  margin-left: 10px;
  font-size: 14px;
  color: #142144;
  line-height: 20px;
}
.r22 {
  margin-left: 10px;
  width: 180px;
  height: 90px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0px 2px 10px 0px rgba(201, 212, 230, 0.7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 18px;
}
.r3 {
  height: calc(100% - 110px);
}
.cont2 {
  margin-top: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 88px;
  width: 110px;
}
.c1 {
  width: 22px;
  height: 58px;
  background: linear-gradient(134deg, #e9effb 0%, #fbfcff 100%);
  box-shadow: 3px 3px 16px 0px rgba(159, 177, 206, 0.7),
    -4px -3px 10px 0px #ffffff;
  border: 1px solid #ffffff;
  border-radius: 12px 0 0 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.c2 {
  width: 88px;
  height: 88px;
  background: linear-gradient(134deg, #e9effb 0%, #fbfcff 100%);
  box-shadow: 3px 3px 16px 0px rgba(159, 177, 206, 0.7),
    -4px -3px 10px 0px #ffffff;
  border: 1px solid #ffffff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.imgbtn {
  cursor: pointer;
}
.c2t {
  font-size: 14px;
  color: #58627b;
}
.modelist {
  // height: 100%;
  /* width: 342px; */
  background: #ffffff;
  /* box-shadow: 3px 3px 6px 0px #bdcde6,
    -4px -3px 4px 0px rgba(255, 255, 255, 0.5);
  border-radius: 6px; */
  margin: 20px 0 0;
  display: flex;
  flex-direction: row;
  margin: 0 16px;
  /* justify-content: space-between; */
}
.modes {
  width: 50%;
  height: 28px;
  cursor: pointer;
  /* border-radius: 6px; */
  display: flex; /* 使用 Flexbox 布局 */
  justify-content: center; /* 水平居中 */
  align-items: center;
  border: 1px solid rgba(34, 99, 191, 0.09);
}
.modetext {
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 16px;
  color: #2263bf;
  line-height: 28px;
}
.activemodetext {
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 16px;
  color: #fefefe;
  line-height: 22px;
}

.active {
  background: #2263bf;
}
/* 1.过渡动画 */
@keyframes axisX {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.v-enter-active {
  animation: axisX 0.5s;
}
.gzxc {
  margin-top: 16px;
  /* padding-left: 26px; */
  /* height: 640px; */
  height: calc(100% - 64px);
  overflow: auto;
  cursor: pointer;
}
.itemSty {
  line-height: 46px;
  font-size: 14px;
  padding-left: 40px;
  color: #58627b;
}
.itemSty_pick {
  font-size: 14px;
  line-height: 46px;
  background: rgba(110, 141, 251, 0.2);
  color: #6e8dfb;
  padding-left: 40px;
}
::-webkit-scrollbar-thumb {
  background: #d3e3fd;
  border-radius: 4px;
}
::-webkit-scrollbar {
  width: 8px;
  height: 100px;
}

.btncls {
  width: 100%;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.line {
  width: 273px;
  height: 1px;
  margin-left: 14px;
  margin-bottom: 14px;
  box-shadow: 1px 1px 2px 0px #ffffff;
  border: 1px solid #ccddf7;
}
</style>
